Integrand size = 25, antiderivative size = 102 \[ \int \frac {A+B \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx=\frac {(i A+B) \text {arctanh}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a-i b}}\right )}{\sqrt {a-i b} d}-\frac {(i A-B) \text {arctanh}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a+i b}}\right )}{\sqrt {a+i b} d} \]
(I*A+B)*arctanh((a+b*cot(d*x+c))^(1/2)/(a-I*b)^(1/2))/d/(a-I*b)^(1/2)-(I*A -B)*arctanh((a+b*cot(d*x+c))^(1/2)/(a+I*b)^(1/2))/d/(a+I*b)^(1/2)
Time = 2.15 (sec) , antiderivative size = 154, normalized size of antiderivative = 1.51 \[ \int \frac {A+B \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx=\frac {\left (\sqrt {a+i b} (i A+B) \text {arctanh}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a-i b}}\right )+\sqrt {a-i b} (-i A+B) \text {arctanh}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a+i b}}\right )\right ) (A+B \cot (c+d x)) \sin (c+d x)}{\sqrt {a-i b} \sqrt {a+i b} d (B \cos (c+d x)+A \sin (c+d x))} \]
((Sqrt[a + I*b]*(I*A + B)*ArcTanh[Sqrt[a + b*Cot[c + d*x]]/Sqrt[a - I*b]] + Sqrt[a - I*b]*((-I)*A + B)*ArcTanh[Sqrt[a + b*Cot[c + d*x]]/Sqrt[a + I*b ]])*(A + B*Cot[c + d*x])*Sin[c + d*x])/(Sqrt[a - I*b]*Sqrt[a + I*b]*d*(B*C os[c + d*x] + A*Sin[c + d*x]))
Time = 0.44 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.83, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {3042, 4022, 3042, 4020, 25, 73, 221}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {A+B \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A-B \tan \left (c+d x+\frac {\pi }{2}\right )}{\sqrt {a-b \tan \left (c+d x+\frac {\pi }{2}\right )}}dx\) |
\(\Big \downarrow \) 4022 |
\(\displaystyle \frac {1}{2} (A+i B) \int \frac {1-i \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}}dx+\frac {1}{2} (A-i B) \int \frac {i \cot (c+d x)+1}{\sqrt {a+b \cot (c+d x)}}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} (A-i B) \int \frac {1-i \tan \left (c+d x+\frac {\pi }{2}\right )}{\sqrt {a-b \tan \left (c+d x+\frac {\pi }{2}\right )}}dx+\frac {1}{2} (A+i B) \int \frac {i \tan \left (c+d x+\frac {\pi }{2}\right )+1}{\sqrt {a-b \tan \left (c+d x+\frac {\pi }{2}\right )}}dx\) |
\(\Big \downarrow \) 4020 |
\(\displaystyle \frac {i (A+i B) \int -\frac {1}{(i \cot (c+d x)+1) \sqrt {a+b \cot (c+d x)}}d(-i \cot (c+d x))}{2 d}-\frac {i (A-i B) \int -\frac {1}{(1-i \cot (c+d x)) \sqrt {a+b \cot (c+d x)}}d(i \cot (c+d x))}{2 d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {i (A-i B) \int \frac {1}{(1-i \cot (c+d x)) \sqrt {a+b \cot (c+d x)}}d(i \cot (c+d x))}{2 d}-\frac {i (A+i B) \int \frac {1}{(i \cot (c+d x)+1) \sqrt {a+b \cot (c+d x)}}d(-i \cot (c+d x))}{2 d}\) |
\(\Big \downarrow \) 73 |
\(\displaystyle -\frac {(A+i B) \int \frac {1}{-\frac {i \cot ^2(c+d x)}{b}-\frac {i a}{b}+1}d\sqrt {a+b \cot (c+d x)}}{b d}-\frac {(A-i B) \int \frac {1}{\frac {i \cot ^2(c+d x)}{b}+\frac {i a}{b}+1}d\sqrt {a+b \cot (c+d x)}}{b d}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle -\frac {(A-i B) \arctan \left (\frac {\cot (c+d x)}{\sqrt {a-i b}}\right )}{d \sqrt {a-i b}}-\frac {(A+i B) \arctan \left (\frac {\cot (c+d x)}{\sqrt {a+i b}}\right )}{d \sqrt {a+i b}}\) |
-(((A - I*B)*ArcTan[Cot[c + d*x]/Sqrt[a - I*b]])/(Sqrt[a - I*b]*d)) - ((A + I*B)*ArcTan[Cot[c + d*x]/Sqrt[a + I*b]])/(Sqrt[a + I*b]*d)
3.2.1.3.1 Defintions of rubi rules used
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ {p = Denominator[m]}, Simp[p/b Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL inearQ[a, b, c, d, m, n, x]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[c*(d/f) Subst[Int[(a + (b/d)*x)^m/(d^2 + c*x), x], x, d*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[ b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[c^2 + d^2, 0]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(c + I*d)/2 Int[(a + b*Tan[e + f*x])^m*( 1 - I*Tan[e + f*x]), x], x] + Simp[(c - I*d)/2 Int[(a + b*Tan[e + f*x])^m *(1 + I*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && !IntegerQ[m]
Leaf count of result is larger than twice the leaf count of optimal. \(1889\) vs. \(2(84)=168\).
Time = 0.09 (sec) , antiderivative size = 1890, normalized size of antiderivative = 18.53
method | result | size |
parts | \(\text {Expression too large to display}\) | \(1890\) |
derivativedivides | \(\text {Expression too large to display}\) | \(3976\) |
default | \(\text {Expression too large to display}\) | \(3976\) |
A*(-1/4/d/b/(a^2+b^2)*ln(b*cot(d*x+c)+a+(a+b*cot(d*x+c))^(1/2)*(2*(a^2+b^2 )^(1/2)+2*a)^(1/2)+(a^2+b^2)^(1/2))*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a^2-1/4/ d*b/(a^2+b^2)*ln(b*cot(d*x+c)+a+(a+b*cot(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+ 2*a)^(1/2)+(a^2+b^2)^(1/2))*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+1/4/d/b/(a^2+b^2 )^(3/2)*ln(b*cot(d*x+c)+a+(a+b*cot(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^( 1/2)+(a^2+b^2)^(1/2))*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a^3+1/4/d*b/(a^2+b^2)^ (3/2)*ln(b*cot(d*x+c)+a+(a+b*cot(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/ 2)+(a^2+b^2)^(1/2))*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a+1/d/b/(a^2+b^2)^(1/2)/ (2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b*cot(d*x+c))^(1/2)+(2*(a^2+b^2 )^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))*a^2+1/d*b/(a^2+b^2)^(1/ 2)/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b*cot(d*x+c))^(1/2)+(2*(a^2+ b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))-1/d/b/(a^2+b^2)^(3/2 )/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b*cot(d*x+c))^(1/2)+(2*(a^2+b ^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))*a^4-3/d*b/(a^2+b^2)^( 3/2)/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b*cot(d*x+c))^(1/2)+(2*(a^ 2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))*a^2-2/d*b^3/(a^2+b ^2)^(3/2)/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b*cot(d*x+c))^(1/2)+( 2*(a^2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))+1/4/d/b/(a^2+ b^2)*ln(b*cot(d*x+c)+a-(a+b*cot(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2 )+(a^2+b^2)^(1/2))*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a^2+1/4/d*b/(a^2+b^2)*...
Leaf count of result is larger than twice the leaf count of optimal. 1773 vs. \(2 (78) = 156\).
Time = 0.32 (sec) , antiderivative size = 1773, normalized size of antiderivative = 17.38 \[ \int \frac {A+B \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx=\text {Too large to display} \]
1/2*sqrt(-((a^2 + b^2)*d^2*sqrt(-(4*A^2*B^2*a^2 - 4*(A^3*B - A*B^3)*a*b + (A^4 - 2*A^2*B^2 + B^4)*b^2)/((a^4 + 2*a^2*b^2 + b^4)*d^4)) + 2*A*B*b + (A ^2 - B^2)*a)/((a^2 + b^2)*d^2))*log((2*(A^3*B + A*B^3)*a - (A^4 - B^4)*b)* sqrt((b*cos(2*d*x + 2*c) + a*sin(2*d*x + 2*c) + b)/sin(2*d*x + 2*c)) + ((A *a^3 + B*a^2*b + A*a*b^2 + B*b^3)*d^3*sqrt(-(4*A^2*B^2*a^2 - 4*(A^3*B - A* B^3)*a*b + (A^4 - 2*A^2*B^2 + B^4)*b^2)/((a^4 + 2*a^2*b^2 + b^4)*d^4)) + ( 2*A*B^2*a^2 - (3*A^2*B - B^3)*a*b + (A^3 - A*B^2)*b^2)*d)*sqrt(-((a^2 + b^ 2)*d^2*sqrt(-(4*A^2*B^2*a^2 - 4*(A^3*B - A*B^3)*a*b + (A^4 - 2*A^2*B^2 + B ^4)*b^2)/((a^4 + 2*a^2*b^2 + b^4)*d^4)) + 2*A*B*b + (A^2 - B^2)*a)/((a^2 + b^2)*d^2))) - 1/2*sqrt(-((a^2 + b^2)*d^2*sqrt(-(4*A^2*B^2*a^2 - 4*(A^3*B - A*B^3)*a*b + (A^4 - 2*A^2*B^2 + B^4)*b^2)/((a^4 + 2*a^2*b^2 + b^4)*d^4)) + 2*A*B*b + (A^2 - B^2)*a)/((a^2 + b^2)*d^2))*log((2*(A^3*B + A*B^3)*a - (A^4 - B^4)*b)*sqrt((b*cos(2*d*x + 2*c) + a*sin(2*d*x + 2*c) + b)/sin(2*d* x + 2*c)) - ((A*a^3 + B*a^2*b + A*a*b^2 + B*b^3)*d^3*sqrt(-(4*A^2*B^2*a^2 - 4*(A^3*B - A*B^3)*a*b + (A^4 - 2*A^2*B^2 + B^4)*b^2)/((a^4 + 2*a^2*b^2 + b^4)*d^4)) + (2*A*B^2*a^2 - (3*A^2*B - B^3)*a*b + (A^3 - A*B^2)*b^2)*d)*s qrt(-((a^2 + b^2)*d^2*sqrt(-(4*A^2*B^2*a^2 - 4*(A^3*B - A*B^3)*a*b + (A^4 - 2*A^2*B^2 + B^4)*b^2)/((a^4 + 2*a^2*b^2 + b^4)*d^4)) + 2*A*B*b + (A^2 - B^2)*a)/((a^2 + b^2)*d^2))) - 1/2*sqrt(((a^2 + b^2)*d^2*sqrt(-(4*A^2*B^2*a ^2 - 4*(A^3*B - A*B^3)*a*b + (A^4 - 2*A^2*B^2 + B^4)*b^2)/((a^4 + 2*a^2...
\[ \int \frac {A+B \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx=\int \frac {A + B \cot {\left (c + d x \right )}}{\sqrt {a + b \cot {\left (c + d x \right )}}}\, dx \]
\[ \int \frac {A+B \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx=\int { \frac {B \cot \left (d x + c\right ) + A}{\sqrt {b \cot \left (d x + c\right ) + a}} \,d x } \]
\[ \int \frac {A+B \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx=\int { \frac {B \cot \left (d x + c\right ) + A}{\sqrt {b \cot \left (d x + c\right ) + a}} \,d x } \]
Time = 15.29 (sec) , antiderivative size = 2909, normalized size of antiderivative = 28.52 \[ \int \frac {A+B \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx=\text {Too large to display} \]
2*atanh((32*B^2*b^2*((B^2*a*d^2)/(4*(a^2*d^4 + b^2*d^4)) - (-16*B^4*b^2*d^ 4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)))^(1/2)*(a + b*cot(c + d*x))^(1/2))/((16* B^3*b^2)/d - (16*B^3*a^2*b^2*d^3)/(a^2*d^4 + b^2*d^4) + (4*B*a*b^2*d^2*(-1 6*B^4*b^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5)) + (8*a*b^2*((B^2*a*d^2)/(4*(a^2 *d^4 + b^2*d^4)) - (-16*B^4*b^2*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)))^(1/2) *(a + b*cot(c + d*x))^(1/2)*(-16*B^4*b^2*d^4)^(1/2))/(16*B^3*b^4*d + 16*B^ 3*a^2*b^2*d - (16*B^3*a^2*b^4*d^5)/(a^2*d^4 + b^2*d^4) - (16*B^3*a^4*b^2*d ^5)/(a^2*d^4 + b^2*d^4) + (4*B*a^3*b^2*d^4*(-16*B^4*b^2*d^4)^(1/2))/(a^2*d ^5 + b^2*d^5) + (4*B*a*b^4*d^4*(-16*B^4*b^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5 )) - (32*B^2*a^2*b^2*d^2*((B^2*a*d^2)/(4*(a^2*d^4 + b^2*d^4)) - (-16*B^4*b ^2*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)))^(1/2)*(a + b*cot(c + d*x))^(1/2))/ (16*B^3*b^4*d + 16*B^3*a^2*b^2*d - (16*B^3*a^2*b^4*d^5)/(a^2*d^4 + b^2*d^4 ) - (16*B^3*a^4*b^2*d^5)/(a^2*d^4 + b^2*d^4) + (4*B*a^3*b^2*d^4*(-16*B^4*b ^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5) + (4*B*a*b^4*d^4*(-16*B^4*b^2*d^4)^(1/2 ))/(a^2*d^5 + b^2*d^5)))*((B^2*a*d^2)/(4*(a^2*d^4 + b^2*d^4)) - (-16*B^4*b ^2*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)))^(1/2) + 2*atanh((8*a*b^2*((-16*B^4 *b^2*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)) + (B^2*a*d^2)/(4*(a^2*d^4 + b^2*d ^4)))^(1/2)*(a + b*cot(c + d*x))^(1/2)*(-16*B^4*b^2*d^4)^(1/2))/((16*B^3*a ^2*b^4*d^5)/(a^2*d^4 + b^2*d^4) - 16*B^3*a^2*b^2*d - 16*B^3*b^4*d + (16*B^ 3*a^4*b^2*d^5)/(a^2*d^4 + b^2*d^4) + (4*B*a^3*b^2*d^4*(-16*B^4*b^2*d^4)...